package com.yiyi.credit.manage.model.vo;

import java.io.Serializable;
import java.util.List;


public class PaginationVo implements Serializable {


    private Integer start;


    private Integer length;


    private Long recordsTotal;


    private Integer pageIndex;


    private Integer page;

    private List<?> data;

    public PaginationVo() {

    }

    public PaginationVo(Integer pageIndex) {
        if (null == pageIndex || pageIndex < 1) {
            this.pageIndex = 1;
        } else {
            this.pageIndex = pageIndex;
        }
        this.length = 10;
        this.start = (this.pageIndex - 1) * length;
    }

    public PaginationVo(Integer pageIndex, Integer length) {
        if (null == pageIndex || pageIndex < 1) {
            this.pageIndex = 1;
        } else {
            this.pageIndex = pageIndex;
        }
        this.length = length;
        this.start = (this.pageIndex - 1) * length;
    }

    public Integer getStart() {
        return start;
    }

    public void setStart(Integer start) {
        this.start = start;
    }

    public Integer getLength() {
        return length;
    }

    public void setLength(Integer length) {
        this.length = length;
    }

    public Long getRecordsTotal() {
        return recordsTotal;
    }

    public void setRecordsTotal(Long recordsTotal) {
        this.recordsTotal = recordsTotal;
    }

    public Integer getPageIndex() {
        return pageIndex;
    }

    public void setPageIndex(Integer pageIndex) {
        this.pageIndex = pageIndex;
    }

    public List<?> getData() {
        return data;
    }

    public void setData(List<?> data) {
        this.data = data;
    }

    public Integer getPage() {
        return page;
    }

    public void setPage(Integer page) {
        this.page = page;
    }
}
